﻿using System;
using System.Text.RegularExpressions;

namespace QuickBencher.Repositories
{
	internal class MeasurementDTO
	{
		public MeasurementDTO()
		{
			Timestamp = DateTime.Now;
		}

		public string Label { get; set; }

		public string Id
		{
			get
			{
				if (string.IsNullOrEmpty(Label))
					return "no-name";

				return Regex.Replace(Label, @"\^|,|\s|:|#|;|!|@|\.|\*|\+|\?|\(|\)|=|´|\$|_|%|/|¨|~", "");

				return Label.Replace(" ", "").Replace("\t", "");
			}
		}

		public double UserTime { get; set; }
		public double SystemTime { get; set; }
		public double TotalTime { get; set; }
		public double RealTime { get; set; }
		public DateTime Timestamp { get; set; }
	}
}
